home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # lpd interface script for prserver.
- # We use sh instead of csh here because it is faster. Especially, no .cshrc.
- # Note that this script is NOT used with the "if" case.
-
- # Make sure we do not get the wrong TranScript filter.
- PATH=/bin:/usr/bin:/usr/ucb:/usr/lib/transcript
- export PATH
-
- # Cannot pass file parameter through to prserver. It will be hooked up to stdin.
- while test $# != 0; do
- case "$1" in
- -f) FILE=$2; shift;;
- -p) PRINTER=$2; shift;;
- -n) USER=$2; shift;;
- -h) HOST=$2; shift;;
- *) ;;
- esac
- shift
- done
-
- PRSERVER="/usr/lib/NextPrinter/Server/prserver -p $PRINTER -n $USER -h $HOST -f -"
- FILTER=`basename $0`
- case $FILTER in
- pstf) pscat | $PRSERVER;;
- psgf) psplot | $PRSERVER;;
- psnf) psdit | $PRSERVER;;
- psdf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
- psvf|pscf|psrf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
- esac
-